# $Id: PKGBUILD 183455 2013-04-21 22:12:04Z heftig $
# Maintainer: Jan de Groot <jgc@archlinux.org>
# Contributor: Giovanni Scafora <giovanni@archlinux.org>

pkgname=rhythmbox
pkgver=2.99.1
pkgrel=1
pkgdesc="An iTunes-like music playback and management application"
arch=(i686 x86_64)
license=(GPL)
url="http://www.rhythmbox.org"
depends=(dconf desktop-file-utils gst-plugins-base gst-plugins-good libsoup json-glib libnotify libpeas media-player-info python2-gobject totem-plparser tdb webkitgtk3)
makedepends=(itstool intltool brasero gobject-introspection vala grilo libdmapsharing lirc-utils libgpod libmtp)
optdepends=('gst-plugins-ugly: Extra media codecs'
            'gst-plugins-bad: Extra media codecs'
            'gst-libav: Extra media codecs'
            'brasero: Audio CD Recorder plugin'
            'libdmapsharing: DAAP Music Sharing plugin'
            'grilo-plugins: Grilo media browser plugin'
            'lirc-utils: LIRC plugin'
            'libgpod: Portable Players - iPod plugin'
            'libmtp: Portable Players - MTP plugin'
            'zeitgeist: Zeitgeist plugin')
options=('!libtool' '!emptydirs')
install=rhythmbox.install
source=(http://ftp.gnome.org/pub/GNOME/sources/$pkgname/${pkgver::4}/$pkgname-$pkgver.tar.xz)
sha256sums=('ed30bb534a789e2b50f953e33eee0bb09f389fe813d433a87d504d07be5f7777')

build() {
  cd "$pkgname-$pkgver"
  PYTHON=/usr/bin/python2 ./configure --prefix=/usr --sysconfdir=/etc \
      --libexecdir=/usr/lib/rhythmbox \
      --localstatedir=/var --disable-static \
      --enable-daap --enable-python --enable-vala
  make
}

package() {
  cd "$pkgname-$pkgver"
  make DESTDIR="$pkgdir" install
  rm -r "$pkgdir/usr/lib/rhythmbox/sample-plugins"
}
